package com.test.action;

import java.util.List;

import com.test.entity.CardType;
import com.test.service.CardTypeService;

public class CardTypeGuanliAction extends BaseAction {
	private CardTypeService cardTypeService;
	private int choose;
	private String CardTypeName;
	private CardType cardType;
	private Integer Id;

	public String cardType() throws Exception {
		if (choose == 1) {
			List<CardType> listcard = cardTypeService.queryCardType();
			this.getRequest().put("list", listcard);
			return "listcard";
		}
		if (choose == 2) {
			List<CardType> list = cardTypeService.queryCardName(CardTypeName);
			this.getRequest().put("list", list);
			return "listcard";
		}
		return null;

	}

	public CardTypeService getCardTypeService() {
		return cardTypeService;
	}

	public void setCardTypeService(CardTypeService cardTypeService) {
		this.cardTypeService = cardTypeService;
	}

	public int getChoose() {
		return choose;
	}

	public void setChoose(int choose) {
		this.choose = choose;
	}

	public String getCardTypeName() {
		return CardTypeName;
	}

	public void setCardTypeName(String cardTypeName) {
		CardTypeName = cardTypeName;
	}

	public CardType getCardType() {
		return cardType;
	}

	public void setCardType(CardType cardType) {
		this.cardType = cardType;
	}

	public Integer getId() {
		return Id;
	}

	public void setId(Integer id) {
		Id = id;
	}

}
